<jsp:useBean id="r" scope="request" class="Modelo.Representante"/>
<jsp:useBean id="c" scope="request" class="Modelo.ComitePrograma"/>
<jsp:useBean id="programa" scope="request" class="Modelo.Programa"/>
<jsp:useBean id="r2" scope="request" class="Modelo.Representante"/>
<jsp:useBean id="p" scope="request" class="Modelo.Persona"/>
<%
            String tipo = request.getParameter("tipo");
            String id = request.getParameter("codigo");
            String pass = request.getParameter("clave");

            if (id == null || pass == null) {
                response.sendRedirect("index.jsp");
            }

          /*  if (r.validaLogin(id, pass, tipo)) {


                if (tipo.equals("Comite de Programa")) {
                    r2 = r2.findRepresentante(Long.parseLong(id));
                    c = r2.getComiteprograma();
                    String aux = c.getId();
                    programa = programa.findAllPetsByName(c);
                    String aux2 = programa.getId();
                    HttpSession s = request.getSession();
                    s.setAttribute("id", id);
                    s.setAttribute("nombre", r2.getNombre());
                    //REdireccciona a Comiteprograma home
                    out.println("Welcome " + s.getAttribute("nombre") + " <a href=\"logIn.jsp\">Back to main</a>");
                }
                if (tipo.equals("Administrador")) {

                    s.setAttribute("id", id);
                    //REdireccciona a Admin home
                    out.println("Welcome " + r2.getNombre() + " <a href=\"logIn.jsp\">Back to main</a>");

                }

            } else {
                out.println("Invalid username and password");
            }
            // Here you put the check on the username and password
*/
%>